package org.finesys.common.netty.websocket.stomp.entity;

import io.netty.channel.Channel;
import io.netty.util.internal.ObjectUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 订阅信息
 */
@Data
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = true)
public class StompSubscription {

    private final String id;
    private final String destination;
    private final Channel channel;

    public StompSubscription(String id, String destination, Channel channel) {
        this.id = ObjectUtil.checkNotNull(id, "id");
        this.destination = ObjectUtil.checkNotNull(destination, "destination");
        this.channel = ObjectUtil.checkNotNull(channel, "channel");
    }
}
